﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO.Ports;

namespace AAA.SerialPort.Printer
{
    public interface IPrinter
    {
        ICommand Command { get; set; }
        bool OpenCashDrawerBeforePrint { get; set; }
        bool OpenCashDrawerAfterPrint { get; set; }

        bool ExecuteCommand(string strCommand);

        bool Init(string strPortName, int iBaudRate, Parity parity, int iDataBits, StopBits stopBits);
        bool Print(object oData);

        void WriteLine(string strText);
        void Write(string strText);
        void Write(byte[] bData, int iOffset, int iLen);
    }
}
